#define  _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
	int arr[10][10] = { 0 };
	int n = 0;
	scanf("%d",&n);
	int i = 0;
	for (i = 0; i < n; i++)
	{
		int j = 0;
		for (j = 0; j <= i; j++)
		{
			if (i == j || j == 0)
			{
				arr[i][j] = 1;
			}
			else
			{
				arr[i][j] = arr[i-1][j] + arr[i-1][j-1];
			}
		}
	}

	int m = 0;
	for (m = 0; m < n; m++)
	{
		int k = 0;
		for (k = 0; k <= m; k++)
		{
			printf("%d ",arr[m][k]);
		}
		printf("\n");
	}

	return 0;
}